package com.bailin233.controller;

import com.bailin233.service.StudentsService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;

//@RestController
@Controller
@RequestMapping("/students")
public class StudentsController {

    @Resource
    StudentsService studentsService;

    @GetMapping
    public String test(Model model) {
        model.addAttribute("msg", studentsService.query(1));
        return "test";
    }
}
